<template>
	<el-row>
		<el-col :span="24">
			<div class="grid-content">
				<div class="h2">
					<h3>电影管理系统</h3>
				</div>
				<div class="h3">
					<h3>欢迎进入电影管理系统网站&nbsp;&nbsp;登陆时间:{{currentTime}}</h3>
				</div>
				<div style="width: 40%;display: flex;margin-left: 10%;">
					<div class="photo"></div>
					<div class="sel"><select id="skil" name="skil">
							<option value="long">{{user.name}}</option>
						</select></div>
				</div>
				<div class="href" style="width: 10%;"><a href="../login.html">手机端页</a></div>
				<button @click="goOut()">退出</button>
			</div>
		</el-col>
	</el-row>
</template>

<script>
	export default {
		name: 'PCHeader',
		data() {
			return {
				hot: {},
				hots: {
					id: 0
				},
				user: {},
				currentTime: null,
			}
		},
		methods: {
			goOut() {
				localStorage.clear()
				localStorage.setItem('logined', 0)
				this.$router.push('/login')
			},
		},
		mounted() {
			this.$get("/api/user/info")
				.then((resp) => {
					this.user = resp.data.data
					console.log("姓名");
					console.log(this.user.name)
				})
			this.currentTime = new Date().toLocaleString();
		}
	}
</script>

<style>
</style>